﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Net5ApiAndEfMySql.PoModel.SystemAdmin
{
    [Table("role")]
    public  class RoleDbPo
    {
        public RoleDbPo()
        { }
        #region Model
        /// <summary>
        /// 
        /// </summary>
        [Key]
        public int role_id
        {
            get; set;
        }
        /// <summary>
        /// 
        /// </summary>
        public string role_name
        {
            get; set;
        }

        public int role_father_id { get; set; }

        public string role_other_name { get; set; }

        public DateTime role_createtime { get; set; }

        public string uprole_name { get
            {
                if(role_father_id==0)
                {
                    return "--";
                }
                if(role_father_id == 1)
                {
                    return "超级管理员";
                }
                else
                {
                    return "异常数据";
                }
            } }

        public string role_createtimes => role_createtime.ToString("yyyy/MM/dd HH:mm:ss");

        #endregion Model

    }
}
